-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NoQA] [Wave8] Breadcrumbs #32221
[NoQA] [Wave8] Breadcrumbs #32221
Conversation
Question to design team - which alignment is correct? Not totally clear from Figma as sometimes there are +1/-1 pixel differences. See the @mountiny @dannymcclain can you help me tag the right person from the design team? |
Thx @dannymcclain. Now it's clear. I updated the screenshots in the issue description above. I also dropped the example usage in the app, so that now this PR doesn't render anything and can be merged to main. |
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Also I think we want the |
Yes Shawn you're right—good catch! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Testing
src/components/Breadcrumbs.tsx
Outdated
</Text> | ||
)} | ||
|
||
{secondaryBreadcrumb && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{secondaryBreadcrumb && ( | |
{!!secondaryBreadcrumb && ( |
Based on
- I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g.
myBool && <MyComponent />
.
Btw, NAB as this is object
position: 'absolute', | ||
bottom: -8, | ||
left: -8, | ||
height: 12, | ||
width: 22, | ||
paddingLeft: 4, | ||
paddingRight: 4, | ||
alignItems: 'center', | ||
zIndex: -1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not a blocker for the pr since the badge is only visible in dev or staging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok QA team created dedicated GH for us 🙂 : #33283
src/components/Breadcrumbs.tsx
Outdated
breadcrumbs: [BreadcrumbHeader | BreadcrumbStrong, Breadcrumb | undefined]; | ||
}; | ||
|
||
function Breadcrumbs({breadcrumbs}: BreadcrumbsProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: since this is view component, would be good to add custom style
prop as default, like all others. If you think it's never needed, that's 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaciejSWM can you add this possibly in some of your next PRs?
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few NAB comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good, going to move this ahead
conflicts |
ah interesting GN is not showing the files |
@aimane-chnaif changes applied. Also I migrated the storybook to TS to mimick the Search.stories.tsx file. Tested and still works. The additional |
storybook looks good! storybook.mov@mountiny ready to merge 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, lets move this along!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.14-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.14-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.14-6 🚀
|
breadcrumb: { | ||
color: theme.textSupporting, | ||
fontSize: variables.fontSizeh1, | ||
lineHeight: variables.lineHeightSizeh1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting a fixed line height was causing mis-alignment issues when changing the font size, we fixed this in #36655
Coming from #38298 The "Expensify" / "Chats" text elements became misaligned after these changes |
Details
In this PR:
Included: New Breadcrumbs component styled for all the platforms. And a storybook as well.
Not included: No navigation, no onPress events - makes sense to add them during integration with the rest of navigation PRs.
Usage:
This PR only creates
<Breadcrumbs />
component but it doesn't render it anywhere. To render it, use code below in any place, for example inSidebarLinks.js
:Storybook:
Fixed Issues
$ #31766
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop